import request from '@/utils/request'

// 查询前端-用户列表
export function listUser(query) {
  return request({
    url: '/manage/hzjy_user/list',
    method: 'get',
    params: query
  })
}

// 查询前端-用户详细
export function getUser(userId) {
  return request({
    url: '/manage/hzjy_user/' + userId,
    method: 'get'
  })
}

// 新增前端-用户
export function addUser(data) {
  return request({
    url: '/manage/hzjy_user',
    method: 'post',
    data: data
  })
}

// 修改前端-用户
export function updateUser(data) {
  return request({
    url: '/manage/hzjy_user',
    method: 'put',
    data: data
  })
}

// 删除前端-用户
export function delUser(userId) {
  return request({
    url: '/manage/hzjy_user/' + userId,
    method: 'delete'
  })
}

// 导出前端-用户
export function exportUser(query) {
  return request({
    url: '/manage/hzjy_user/export',
    method: 'get',
    params: query
  })
}

// 修改用户状态
export function changeUserstate(userId,state){
  const data={userId,state}
  return request({
    url:'/manage/hzjy_user/changeState',
    method:'post',
    data:data
  })
}
